<template>
  <div class="btn_top_bottom hidden-xl-only">
    <el-button @click="tableTop" circle plain class="mr_10">
      <template #icon>
        <el-icon>
          <Top />
        </el-icon>
      </template>
    </el-button>
    <el-button @click="tableBottom" circle plain>
      <template #icon>
        <el-icon>
          <Bottom />
        </el-icon>
      </template>
    </el-button>
  </div>
</template>

<script setup lang="ts" name="moveButton">
//控制表格上下移动

const tableTop = () => {
  this.refs.tableList.bodyWrapper.scrollTop = 0;
};
const tableBottom = () => {
  this.$nextTik(() => {
    this.$refs.tableList.bodyWrapper.scrollTop =
      this.$refs.tableList.bodyWrapper.scrollHeight;
  });
};
</script>

<style lang="less" scoped></style>
